import { takeEvery, put, delay } from 'redux-saga/effects'
import { hide } from '../actions/modal.action'
import { HIDE_MODAL_ASYNC } from '../const/modal.const'

function* hide_modal_async_fun(action) {
  console.log('modal - action',action)
  yield delay(1000)
  yield put(hide())
}

export default function* modalSaga() {
  yield takeEvery(HIDE_MODAL_ASYNC, hide_modal_async_fun)
}